function photoIntroCtrl($scope,$http){
    $http({
        method: "GET",
        url:'http://localhost:8080/commits',
    }).then(function successCallback(response) {
            console.log("response:"+response);
            console.log(response);
            $scope.commitdata=response.data;

        },
        function errorCallback(response) {
            console.log("error")
            console.log(response);
        });


    $http({
        method: "GET",
        url:'http://localhost:8080/getnowpath',
    }).then(function successCallback(response) {
            console.log("response:"+response);
            console.log(response);
            $scope.nowphoto=response.data;

        },
        function errorCallback(response) {
            console.log("error")
            console.log(response);
        });


    $http({
        method: "GET",
        url:'http://localhost:8080/getcomtype',
    }).then(function successCallback(response) {
            console.log("response:"+response);
            console.log(response);
            $scope.comtypephoto=response.data;

        },
        function errorCallback(response) {
            console.log("error")
            console.log(response);
        });

    $scope.addcommit=function () {
        $http({
            method: "POST",
            url:'http://localhost:8080/addcommit',
            params:{CommitConent:$scope.CommitConent}
        }).then(function successCallback(response) {
                console.log("response:"+response);
                console.log(response);
            },
            function errorCallback(response) {
                console.log("error")
                console.log(response);
            });

        window.location.reload();
    }
}
